package com.cn.qgx428.lazydiary.network.bean

import com.cn.qgx428.lazydiary.Utils.MConst
import com.cn.qgx428.lazydiary.db.bean.CBill
import java.io.Serializable

/**
 * Created by qinguanxiong on 2018/1/10.
 *
 */

/**
 * code : 错误代码
 *      1 无错误
 *      2 获取成功
 *      3 成功，但无数据
 *      4 操作成功
 *      -1 已存在
 *      -2 信息不匹配
 *      -3 操作失败
 */

data class User(val id:Int, val phone:String, var pwd:String, var nickname:String = "", var gender: String = "保密", var image: String = "default")

data class Plan(val id:Int, val userid:Int, var planname:String, var planimage:String, var createtime:String, var endtime: String, var status: String = "进行中"): Serializable

data class PlanDetail(val planid:Int, var content:String, var createtime:String, val id:Int = -1)

data class PlanClockIn(val planid: Int, var content: String, var remark:String, var time: String, val id:Int = -1): Serializable

data class DiaryContent( val type: String, var info: String, val sequence: Int ,var diaryid: Int = -1, val id: Int = -1)

data class Diary(val id:Int, val userid:Int , var title: String, var createtime: String): Serializable

data class Bill(val createtime: String, val type: String, val specific: String, val price: String, val no: String, val total: String, val remark: String): Serializable

/**
 *  response
 */

data class UserInfoResponse(val user:User, val code: String, val msg: String)

data class CommonResponse( val code: String, val msg: String)

data class CommonInserResponse(val id: Int, val code:Int, val msg: String)

data class PlansResponse(val plans: List<Plan>, val code:String, val msg:String)

data class PlanDetailResponse(val planDetails: List<PlanDetail>, val code:Int, val msg:String)

data class PlanHistoryClockInResponse(val history: List<PlanClockIn>, val code: Int, val msg: String)

data class DiaryResponse(val diaries: List<Diary>, val code: Int, val msg: String)

data class DiaryContentResponse(val contents: List<DiaryContent>, val code: Int, val msg: String)

data class DiaryLatestBrifeResponse(val diary: Diary, val diaryContents: List<DiaryContent>, val code: Int, val msg: String)

data class BillResponse(val bills: List<Bill>, val code: Int, val msg: String)